using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class WireName_detailMap : EntityTypeConfiguration<WireName_detail>
    {
        public WireName_detailMap()
        {
            // Primary Key
            this.HasKey(t => t.WireName_ID);

            // Properties
            this.Property(t => t.WN_ID)
                .IsRequired()
                .HasMaxLength(20);

            this.Property(t => t.WireName_type)
                .IsRequired()
                .HasMaxLength(20);

            this.Property(t => t.French_No)
                .IsRequired()
                .HasMaxLength(20);

            this.Property(t => t.product)
                .HasMaxLength(30);

            this.Property(t => t.HospitalID)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("WireName_detail");
            this.Property(t => t.WireName_ID).HasColumnName("WireName_ID");
            this.Property(t => t.WN_ID).HasColumnName("WN_ID");
            this.Property(t => t.WireName_type).HasColumnName("WireName_type");
            this.Property(t => t.French_No).HasColumnName("French_No");
            this.Property(t => t.product).HasColumnName("product");
            this.Property(t => t.HospitalID).HasColumnName("HospitalID");
            this.Property(t => t.drop_state).HasColumnName("drop_state");
        }
    }
}
